package com.itool.util;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Locale;

import org.apache.log4j.Logger;



public class DateUtil {
	private static final Logger log=Logger.getLogger(DateUtil.class);
	
	public static final SimpleDateFormat DATE_PATTERN = new SimpleDateFormat(
			"yyyy-MM-dd");
	public static final SimpleDateFormat DATE_TIME_PATTERN = new SimpleDateFormat(
			"yyyy-MM-dd HH:mm:ss");
	public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(
			"EEE MMM dd HH:mm:ss z yyyy", Locale.US);

	private DateUtil() {
	}

    //-------------------------------------------------------------------//
    public static final String DATE_FORMAT_DEFAULT = "dd-MM-yyyy";
    public static final String TIEM_FORMAT_DEFAULT = "dd-MM-yyyy HH:mm:ss";
    public static final String DATE_FORMAT_WITHOUT_SLASH = "yyyyMMdd";
    public static final String DATE_FORMAT_SLASH = "yyyy/MM/dd";
    public static final String DATE_FORMAT_DDMMYYYY = "ddMMyyyy";
    public static final String DATE_TIME_FORMAT= "yyyy-MM-dd HH:mm:ss.SSS";
    public static final char DEFAULT_DATE_JOINT = '-';
    private static final int ONE_SECOND = 1000;
    private static final int ONE_MINUTE = 60;
    private static final int ONE_HOUR = 60;
    private static final int TEN = 10;

    public static Timestamp getCurrentDateTime() {
        return new Timestamp(System.currentTimeMillis());
    }

}
